var app = new Vue({
	el: '#app',
	mixins: [isLogin],
	components: {
		headers: header,
		navs:nav,
		footers:footer,
		login:login,
	},
	data: {
		bgImg:'img/PCindex/top5.jpg',
		navState:'求职招聘',
		hotJobData:'',//热门职位数据
		recommendJobData:'',//推荐职位
		searchContent:'',//搜索职位的内容
	},
	methods: {
		//header组件的搜索方法
		searchHeader: function(searchCtx) {

		},
		//热门职位
		hotJob: function() {
			var _this = this;
			var method = 'HR/GetHotPosiTitle';
			var param = {};
			xq.getUrl(method, param, function(res) {
				if(res.data) {
					_this.hotJobData = res.data;
				}
			});
		},
		//推荐职位
		recommendJob: function() {
			var _this = this;
			var method = 'HR/GetPageHotPosi';
			var param = {};
			xq.getUrl(method, param, function(res) {
				if(res.data) {
					_this.recommendJobData = res.data;
				}
			});
		},
		//跳转到职业搜索列表
		toRecruiSearch:function(searchContent){
			localStorage.setItem('searchContent',searchContent);
			location.href = 'recruitSearch.html';
		},
		//点击搜索跳转到职业搜索列表
		clickRecruiSearch:function(){
			localStorage.setItem('searchContent',this.searchContent);
			location.href = 'recruitSearch.html';
		},
		//跳转到职业搜索列表
		toRecruiDetail:function(JobID){
			localStorage.setItem('JobID',JobID);
			location.href = 'recruitDetail.html';
		},

	},
	mounted: function() {
		this.hotJob();
		this.recommendJob();
	},
	updated: function() {

	}
})